// 生成一个接口    get请求  返回数据 id  姓名 爱好   等等

const router = require("koa-router")();
const Mock = require("mockjs");
const data = Mock.mock({
  "list|100": [
    {
      "id|+1": 1,
      name: "@cname",
      "hobby|1": ["打篮球", "踢足球", "睡觉", "打代码", "羽毛球", "游泳", "打游戏", "看书", "听歌", "看电影"],
    },
  ],
});

router.get("/mbl/list", (ctx) => {
  ctx.body = {
    code: 200,
    data: data.list,
    message: '成功'
  }
});

module.exports = router;
